@echo off
cd ../
:menu
title uCompile
color 07
cls
echo welcome to ucompile v1.0
echo please note that qcompile currently only compiles java
echo type "l" if you wanna load a compiler
echo type "n" if you wanna create a compiler
echo type "x" to exit
SET /P ACTION=">"
IF %ACTION%==n goto n
IF %ACTION%==l goto l
IF %ACTION%==x exit
:l
cd sessions
dir /ad
echo point us to your java directory
echo the folder list might help
SET /P JAVA_DIR=">"
cd %JAVA_DIR%/session
start compiler.bat
goto repeatzone
:repeatzone
cls
echo repeat zone
echo this window will allow you to compile your application faster
echo type "s" to exit this window
echo type "d" to re-open the java application
SET /P R=">"
IF %R%==s exit
IF %R%==d start compiler.bat
cls
goto repeatzone
pause
:n
title uCompile Wizard - New
echo uCompile wizard
echo ---------------
cd sessions
dir /ad
echo in what directory is your java project?
echo example: myjavaapp
echo the folder list might help
SET /P D=">"
cd %D%/session
echo ---------------
echo what is the name of your java file? (if you wanna include all java files in this
echo directory, type "*.java")
SET /P F=">"
echo ---------------
echo give us the filename of your manifest.mf (MUST BE IN THE SAME DIRECTORY THAN THE JAVA FILE!)
SET /P M=">"
echo ---------------
echo how should your .jar be called? (add .jar to the end)
SET /P J=">"
cls
color 02
title uCompile Wizard - Creating 1/6
echo step 1/6
echo del *.class>>compiler.bat
ping localhost -n 1 >nul
title uCompile Wizard - Creating 2/6
echo step 2/6
echo javac %F%>>compiler.bat
ping localhost -n 1 >nul
title uCompile Wizard - Creating 3/6
echo step 3/6
echo del *.jar>>compiler.bat
ping localhost -n 1 >nul
title uCompile Wizard - Creating 4/6
echo step 4/6
echo jar -cvmf %M% %J% *.class>>compiler.bat
ping localhost -n 1 >nul
title uCompile Wizard - Creating 5/6
echo step 5/6
echo start %J%>>compiler.bat
ping localhost -n 1 >nul
title uCompile Wizard - Creating 6/6
echo step 6/6
echo exit>>compiler.bat
ping localhost -n 1 >nul
start compiler.bat
echo successfully created compiler!
echo press any key to exit the wizard
pause>nul
exit